﻿using System.IO;
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;

namespace System.Net.Security
{
    public class SslStream : AuthenticatedStream
    {
        public SslStream(Stream innerStream)
            : this(innerStream, false) { }

        public SslStream(Stream innerStream, bool leaveInnerStreamOpen)
            : this(innerStream, leaveInnerStreamOpen, null) { }

        public SslStream(Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback)
            : this(innerStream, leaveInnerStreamOpen, userCertificateValidationCallback, null) { }

        public SslStream(Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback,
            LocalCertificateSelectionCallback userCertificateSelectionCallback)
            : this(innerStream, leaveInnerStreamOpen, userCertificateValidationCallback, userCertificateSelectionCallback, null) { }

        public SslStream(Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback,
            LocalCertificateSelectionCallback userCertificateSelectionCallback, EncryptionPolicy encryptionPolicy)
        {
            throw new NotImplementedException();
        }

        public virtual bool CheckCertRevocationStatus { get; private set; }
        public virtual CipherAlgorithmType CipherAlgorithm { get; private set; }
        public virtual int CipherStrength { get; private set; }
        public virtual HashAlgorithmType HashAlgorithm { get; private set;}
        public virtual int HashStrength { get; private set; }
        public virtual ExchangeAlgorithmType KeyExchangeAlgorithm { get; private set;}
        public virtual int KeyExchangeStrength { get; private set; }
        public virtual X509Certificate LocalCertificate { get; private set; }
        public virtual X509Certificate RemoteCertificate { get; private set; }
        public virtual SslProtocols SslProtocol { get; private set; }


        public virtual void AuthenticateAsClient(string targetHost)
        {
            throw new NotImplementedException();
        }

        public virtual void AuthenticateAsClient(string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocol, bool checkCertificateRevocation)
        {
            throw new NotImplementedException();
        }

        public virtual IAsyncResult BeginAuthenticateAsClient(string targetHost, AsyncCallback asyncCallback, object asyncState)
        {
            throw new NotImplementedException();
        }

        public virtual IAsyncResult BeginAuthenticateAsClient(string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols,
            bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState)
        {
            throw new NotImplementedException();
        }

        public virtual IAsyncResult BeginAuthenticateAsServer(X509Certificate serverCertificate, AsyncCallback asyncCallback, object asyncState)
        {
            throw new NotSupportedException();
        }

        public virtual IAsyncResult BeginAuthenticateAsServer(X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState)
        {
            throw new NotSupportedException();
        }

        public virtual void EndAuthenticateAsClient(IAsyncResult asyncResult)
        {
            throw new NotImplementedException();
        }

        public virtual void EndAuthenticateAsServer(IAsyncResult asyncResult)
        {
            throw new NotImplementedException();
        }

        public override bool CanRead
        {
            get { return this.InnerStream.CanRead; }
        }

        public override bool CanSeek
        {
            get { return this.InnerStream.CanSeek; }
        }

        public override bool CanWrite
        {
            get { return this.InnerStream.CanWrite; }
        }

        public override void Flush()
        {
            this.InnerStream.Flush();
        }

        public override long Length
        {
            get { return InnerStream.Length; }
        }

        public override long Position
        {
            get { return this.InnerStream.Position; }
            set { this.InnerStream.Position = value; }
        }

        public override int Read(byte[] buffer, int offset, int count)
        {
            throw new NotImplementedException();
        }

        public override long Seek(long offset, SeekOrigin origin)
        {
            return this.InnerStream.Seek(offset, origin);
        }

        public override void SetLength(long value)
        {
            this.InnerStream.SetLength(value);
        }

        public override void Write(byte[] buffer, int offset, int count)
        {
            throw new NotImplementedException();
        }

        public override bool IsAuthenticated
        {
            get { throw new NotImplementedException(); }
        }

        public override bool IsEncrypted
        {
            get { throw new NotImplementedException(); }
        }

        public override bool IsMutuallyAuthenticated
        {
            get { throw new NotImplementedException(); }
        }

        public override bool IsServer
        {
            get { throw new NotImplementedException(); }
        }

        public override bool IsSigned
        {
            get { throw new NotImplementedException(); }
        }
    }
}
